package cn.studyjava.verify.code12306.common;

import cn.studyjava.verify.code12306.common.enums.StyleEnum;

/**
 * 
 * Created on 2015-6-25
 * <p>
 * Title: 常量
 * </p>
 * <p>
 * Copyright: Copyright (c) 12306test.com 2015
 * </p>
 * <p>
 * Company: websuper
 * </p>
 * 
 * @author [mikin840815] [58294114@qq.com]
 * @version 1.0
 */
public class Const {
	
	/**
	 * 验证码个数
	 */
	public static StyleEnum STYLE = StyleEnum.EIGHT;
	
	/**
	 * 验证图片的宽度/2
	 * 使用的12306的验证图标宽度26，默认js取得位置是最左边和最顶部，因此和点击的位置差一半，需要补
	 */
	public final static double OFFSET = 13;
	/**
	 * 验证码 边框宽
	 */
	public final static double BODER = 2.0;
	/**
	 * 验证码 内填充边距
	 */
	public final static double PADDING = 5.0;
	/**
	 * 验证码图 宽
	 */
	public final static double WIDTH = 67.0;
	/**
	 * 验证码图 高
	 */
	public final static double HEIGHT = 67.0;
	/**
	 * 验证码上方提示文字 行高
	 */
	public final static double TEXT_HEIGHT = 25.0;
    
	/**
	 * 默认获取验证码后失效时间
	 */
	public static final int DEFAULT_VERIFY_TIME_SECONDS = 300;

	/**
	 * 验证失败
	 */
	public static final int VERIFY_STATUS_FAIL = 0;
	public static final String VERIFY_STATUS_FAIL_MSG = "失败";
	/**
	 * 验证成功
	 */
	public static final int VERIFY_STATUS_SUCCESS = 1;
	
	public static final String VERIFY_STATUS_SUCCESS_MSG = "成功";
	
	public static final String VERIFY_CODE_12306_LOCK = "VERIFY:CODE:12306:LOCK";

	/**
	 * 已经使用的验证码
	 */
	public static String REDIS_ALREADY_PREFIX = "already:12306:";
	
	/**
	 * 存放验证码的redis set 集合
	 */
	public static String VERIFY_CODE_SET = "verify:code:12306:set";
    
}